/********************************************************************************
 *      Copyright:  (C) HuangXiangming
 *                  All rights reserved.
 *
 *       Filename:  sqlite_server.h
 *    Description:  This file is about client sqlite function
 *
 *        Version:  1.0.0(25/04/03)
 *         Author:  Huang Xiangming<huangxiangming@gmail.com>
 *      ChangeLog:  1, Release initial version on "25/04/03 14:12:26"
 *                 
********************************************************************************/

#ifndef SQLITECLIENT_H
#define SQLITECLIENT_H

#include "get_data.h"

//数据库初始化
int sqlite_init(char *table_name);

//关闭数据库
void sqlite_close(void);

//判断数据库是否存在
int sqlite_table(char *table_name);
static int table_callback(void *exec_para, int n_column, char **column_value, char **column_name);

//插入数据
int sqlite_inset(pack_t *data);

//查询第一条数据
int get_database_1st_record(pack_t *data);
static int record_query_callback(void *exec_para, int n_column, char **column_value, char **column_name);

//删除数据
int delete_record(pack_t *data);

#endif
